# ----案例：QQ群类----
# 编写一个QQ群类：
# 属性：群号、群名、成员、群暗号
# 方法：显示群号、显示群名、显示群成员、出示群暗号、添加群成员、移除群成员

# class QQ:
#     groupnum='123456789'
#     groupname='QQ群'
#     member='member'
#     key='暗号暗号'
#
#     def __init__(self,QQgroupnum,QQgroupname,addmember,removemem,showkey):
#         self.QQgroupnum
#         self.QQgroupname
#         self.addmember
#         self.removemem
#         self.showkey



class QQGroup:
    def __init__(self, group_id, group_name, members, group_password):
        self.group_id = 123456
        self.group_name = 'QQgroup'
        self.members = members
        self.group_password = group_password

    def show_group_id(self):
        print(f'群号是{self.group_id}')

    def show_group_name(self):
        print(self.group_name)

    def show_group_members(self):
        print(self.members)

    def show_group_password(self):
        print(self.group_password)

    def add_group_member(self, member):
        self.members.append(member)

    def remove_group_member(self, member):
        self.members.remove(member)